package com.bjwl.dao.safty;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.bjwl.view.UserQueryView;

public interface UserDao {

	@Select("SELECT ur.u_id,u_name,u_status,ro_name,ro_status FROM sys_user u\r\n" + 
			"     INNER JOIN sys_ur ur ON ur.u_id=u.u_id\r\n" + 
			"     INNER JOIN sys_role ro ON ro.ro_id=ur.ro_id")
	List<UserQueryView> queryUser();

	@Update("UPDATE`sys_user` SET `u_status`='55' WHERE u_id=#{u_id}")
	Integer enableUser(String u_id);
	
	@Update("UPDATE`sys_user` SET `u_status`='77' WHERE u_id=#{u_id}")
	Integer disableUser(String u_id);

}
